package cc.cc4414.crtc.webSocket;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cc 2018年10月26日
 */
@RestController
@RequestMapping("webSocket")
public class WebSocketController {
	@Autowired
	private WebSocket webSocket;

	@PostMapping("send")
	public void send(String message, String userId) {
		webSocket.sendMessage(message, userId);
	}
}
